package com.kaiqingsun.io;

import java.io.FileOutputStream;
import java.io.OutputStream;

public class Demo10 {
    public static void main(String[] args) throws Exception{
        try(OutputStream os = new FileOutputStream("./world.txt")){
            byte[] buf = {0x65,0x65,0x20,0x65,0x0d,0x0a,(byte) 0xe6,(byte)0x88,(byte)0x91};
            os.write(buf,2,3);//整个buf的数据全部写入
            os.flush();
        }
    }
}
